<template>
    <div>
        hello
        <router-link to='/about'>123</router-link>
        <div id="main" style="width: 600px;height:400px;"></div>
    </div>
</template>

<script>
    // import echarts from "echarts"
    export default {
        name: 'Info',
        methods: {
    drawChart() {
        // console.log(this.$echarts)
      // 基于准备好的dom，初始化echarts实例
      let myChart = this.$echarts.init(document.getElementById("main"));
      // 指定图表的配置项和数据
      let option ={
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line'
    }]
};
      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option);
    }
  },
  mounted() {
    this.drawChart();
  }
    }
</script>

<style lang="stylus" scoped>

</style>